import request from '@/utils/request'

// 查询指标维护列表
export function listDealIndicatorsMaintain(query) {
  return request({
    url: '/maintain/dealIndicatorsMaintain/list',
    method: 'get',
    params: query
  })
}

// 查询指标维护详细
export function getDealIndicatorsMaintain(id) {
  return request({
    url: '/maintain/dealIndicatorsMaintain/' + id,
    method: 'get'
  })
}

// 保存指标维护
export function saveDealIndicatorsMaintain(data) {
  return request({
    url: '/maintain/dealIndicatorsMaintain/save',
    method: 'post',
    data: data
  })
}

// 删除指标维护
export function delDealIndicatorsMaintain(id) {
  return request({
    url: '/maintain/dealIndicatorsMaintain/' + id,
    method: 'delete'
  })
}

// 导出指标维护
export function exportDealIndicatorsMaintain(query) {
  return request({
    url: '/maintain/dealIndicatorsMaintain/export',
    method: 'get',
    params: query
  })
}

// 获取indicatorYear指标年度的上一年指标维护明细信息
export function getLastIndicatorsMaintainByIndicatorYear(param) {
  return request({
    url: '/maintain/dealIndicatorsMaintain/getLastIndicatorsMaintainByIndicatorYear',
    method: 'get',
    params: param
  })
}

// 批量保存
export function saveBatch(data) {
  return request({
    url: '/batch/dealIndicatorBatch/save',
    method: 'post',
    data: data
  })
}
